package imdbfolder.gui.util;

import java.awt.Component;
import java.awt.Container;

public class Components {
    public static int findComponentIndex(Container parent, Component child) {
        int index = 0;

        for (Component component : parent.getComponents()) {
            if (component == child) {
                break;
            }
            index++;
        }

        return index;
    }

}
